package com.best.rabbitmq;

import com.best.config.RabbitmqConfig;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Jiang Akang
 * employeeId: BG435424
 * @date 2020/11/20
 **/
@Component
public class ReceiveHandler {

    @RabbitListener(queues = {RabbitmqConfig.QUEUE_INFORMA_EMAIL})
    public void send_email(String msg, Message message, Channel channel) {
        System.out.println("receive message is: " + msg);
    }

}
